package code.jzh.compiler.scanner;

import code.jzh.compiler.util.Constants;

public enum LexerType {
	/*ADD("+"), SUB("-"), MUL("*"), DIV("/"), EQUAL("="), 
	VOID("void"), INT("int"), FLOAT("float"),
	OPENCURVE("("), CLOSECURVE(")"), 
	OPENBRACKET("["), CLOSEBRACKET("]"), 
	OPENBRACE("{"), CLOSEBRACE("}"),
	COMMA(","), COLON(":"), SEMICOLON(";"),
	STRING("\"([ -~])*\""),
	DELIMETER("( |\t|\n)*"),*/
	
	/*ADD("+"), SUB("-"), MUL("*"), DIV("/"), EQUAL("="), 
	VOID("void"), INT("int"), FLOAT("float"),
	OPENCURVE("("), CLOSECURVE(")"),
	OPENBRACKET("["), CLOSEBRACKET("]"), 
	OPENBRACE("{"), CLOSEBRACE("}"),
	COMMA(","), COLON(":"), SEMICOLON(";"),
	STRING("\"（【#-~】或 或!）×\""),
	DELIMETER("（ 或\t或\n）×"),
	FLOATNUMBER("【0-9】×.【0-9】【0-9】×"), NUMBER("【0-9】×"),
	IDENTIFIER("（_或【a-z】或【A-Z】）（_或【a-z】或【A-Z】或【0-9】）×");*/
	
	ADD(Constants.escape+"+"), SUB("-"), MUL(Constants.escape+"*"), DIV("/"), EQUAL("="), 
	VOID("void"), INT("int"), FLOAT("float"),
	OPENCURVE(Constants.escape+"("), CLOSECURVE(Constants.escape+")"), 
	OPENBRACKET("["), CLOSEBRACKET("]"), 
	OPENBRACE("{"), CLOSEBRACE("}"),
	COMMA(","), COLON(":"), SEMICOLON(";"),
	STRING("\"([#-~]| |!|"+Constants.escape+"\")*\""),
	DELIMETER("( |\t|\n)( |\t|\n)*"),
	FLOATNUMBER("[0-9]*.[0-9][0-9]*"), NUMBER("[0-9]*"),
	IDENTIFIER("(_|[a-z]|[A-Z])(_|[a-z]|[A-Z]|[0-9])*");
	
	public String pattern;
	
	private LexerType(String pattern){
		this.pattern = pattern;
	}
	
}
